<?php
/**
 * 查看二维码
 * @author Guangpeng Chen
 * @date  2015-11-05
 */
$code = $_SERVER['QUERY_STRING'];
?>
<html>
<head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>扫一扫</title>
    <script src="http://wx.12301.cc/public/js/plugins/qrcode.min.js"></script>
    <style>
        body{
            margin: 0;
            padding: 0;
            text-align: center;
            margin-top: 10px;
        }
        .wxpay-logo{
            width: 230px;
            height: 230px;
            margin: 0 auto;
        }
    </style>
</head>
<body>
<?php if($code):?>
    <div class="wxpay-logo">
        <div id="qrcode"></div>
        <p>凭证号：<?=$code?></p>
    </div>
    <script>
        var qrcode = new QRCode("qrcode", {
            text: "<?=$code;?>",
            width: 220,
            height: 220,
            colorDark : "#000000",
            colorLight : "#ffffff",
            correctLevel : QRCode.CorrectLevel.H
        });
    </script>
<?php endif;?>
</body>
</html>